package com.xuecheng.media.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.commons.model.dto.MediaDto;
import com.xuecheng.commons.model.dto.MediaQueryDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.dto.VodUploadDto;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.media.domain.Media;

/**
 * <p>
 * 媒资信息 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-07-24
 */
public interface MediaService extends IService<Media> {
    //获取阿里云上传凭证
    ResponseResult createToken(VodUploadDto dto) throws Exception;

    //刷新阿里云上传凭证
    ResponseResult refreshToken(String videoId) throws Exception;

    //保存媒资信息
    ResponseResult saveMedia(MediaDto dto) throws Exception;

    //分页查询媒资信息
    ResponseResult findMediaList(PageRequest page, MediaQueryDto dto);

    //根据媒资id获取播放连接
    ResponseResult findPreviewMediaId(String mediaId) throws Exception;

    //根据id删除媒资信息
    ResponseResult deleteMedia(String mediaId) throws Exception;
}
